﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<EHRForce.Helpers.PaginatedList<EHRForce.Models.Patient>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Patient Index</h2>
    
    <ul>
        <% foreach (var patient in Model) { %>
            <li>
                <%= Html.ActionLink(patient.ChartNumber, "Details", new { id=patient.PatientUID }) %> |
                <%= Html.Encode(patient.PatientUID)%> |
                <%= Html.Encode(patient.LastName)%>,
                <%= Html.Encode(patient.FirstName)%> |
                <%= Html.Encode(patient.Gender)%> |
                <%= Html.Encode(patient.DateOfBirth.ToString())%>
            </li>
        <% } %>
    </ul>
    
    <% if (Model.HasPreviousPage)
       { %>
        <%= Html.RouteLink("<<<", "Patients", new { page = (Model.PageIndex - 1) })%>
    <% } %>
    
    <% if (Model.HasNextPage)
       { %>
        <%= Html.RouteLink(">>>", "Patients", new { page = (Model.PageIndex + 1) })%>
    <% } %>

</asp:Content>

